-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools: update to Eslint 3.19.0 and replace custom rule #12162
Conversation
ESLint 3.19.0 allows the specification of selectors that represent disallowed syntax. Replace our custom rule for timer arguments with a pair of `no-restricted-syntax` option objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The no-unescaped-regexp-dot
custom rule does feature detection here for the sourceCode.getIndexFromLoc
and sourceCode.getLocFromIndex
methods, which were added to the ESLint rule API in 3.17.0. Since we've now upgraded to ESLint 3.19.0, that feature detection is probably no longer necessary.
@not-an-aardvark Unless the eslint update gets backported to all branches, it might be best to keep it for awhile for better compatibility since the other branches seem to use different versions of eslint compared to master. |
@mscdex Seems reasonable. If we're interested, almost all of the other custom rules can also be replaced with selectors in
From what I can tell, having these custom rules hasn't been a big maintenance burden, so there's not really any need to switch, but I thought I'd bring up the possibility. |
@not-an-aardvark if we can configure built-in rules rather than creating our own, that seems like a better way to do things. Could you raise a PR so we can see the details of how it would actually work in practice? |
PR-URL: #12162 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
ESLint 3.19.0 allows the specification of selectors that represent disallowed syntax. Replace our custom rule for timer arguments with a pair of `no-restricted-syntax` option objects. PR-URL: #12162 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Landed in 3166652...f637703 |
PR-URL: nodejs#12162 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
cc @Trott |
ESLint 3.19.0 allows the specification of selectors that represent disallowed syntax. Replace our custom rule for timer arguments with a pair of `no-restricted-syntax` option objects. PR-URL: nodejs#12162 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
rich same for v6 |
ESLint 3.19.0 allows the specification of selectors that represent disallowed syntax. Replace our custom rule for timer arguments with a pair of `no-restricted-syntax` option objects. PR-URL: nodejs#12162 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: nodejs#12162 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
ESLint 3.19.0 allows the specification of selectors that represent disallowed syntax. Replace our custom rule for timer arguments with a pair of `no-restricted-syntax` option objects. PR-URL: #12162 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Removing |
...and added |
Backport-PR-URL: nodejs/node#12504 PR-URL: nodejs/node#12162 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Commit 1: Update ESLint to 3.19.0.
Commit 2: ESLint 3.19.0 allows the specification of selectors that represent disallowed syntax. Replace our custom rule for timer arguments with a pair of
no-restricted-syntax
option objects.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
tools